package com.client;

import java.io.InputStream;
import java.io.OutputStream;
import java.net.Socket;

public class ClientMain {

	public static void main(String[] args) throws Exception {

		Socket socket = new Socket("10.10.11.14", 12345);
		
		
		while (true){
			
			InputStream in = System.in;
			byte[] inBuf = new byte[1024];
			
			int i = in.read(inBuf, 0, 1024);
			
			OutputStream out = socket.getOutputStream();
			out.write(inBuf, 0, i);
			out.flush();
			
			in = socket.getInputStream();
			i = in.read(inBuf, 0, 1024);

			System.out.println(new String(inBuf, 0, i));
			
		}
		
		
	}

}
